<!DOCTYPE html>
<html>
<head>
    <!-- 页面meta -->
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>用户管理</title>
    <meta name="description" content="描述">
    <meta name="keywords" content="关键字">
    <meta content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no" name="viewport">
    <!-- 引入样式 -->
    <link rel="stylesheet" href="./plugins/elementui/index.css">
    <link rel="stylesheet" href="./plugins/font-awesome/css/font-awesome.min.css">
    <link rel="stylesheet" href="./csse/style.css">
    <!-- 引入组件库 -->
    <script type="text/javascript" src="./js/jquery.min.js"></script>
    <script src="./js/vue.js"></script>
    <script src="./plugins/elementui/index.js"></script>
    <script src="./js/axios-0.18.0.js"></script>
    <!--请求和响应组件-->
    <script src="./js/public.js"></script>
    <script src="./js/splitparam.js"></script>
    <style>
        .datatable {
            position: relative;
            box-sizing: border-box;
            -webkit-box-flex: 1;
            width: 100%;
            max-width: 100%;
            font-size: 14px;
            color: rgb(96, 98, 102);
            overflow: hidden;
            flex: 110%;
        }

        .datatable td, .datatable th {
            padding: 12px 0;
            min-width: 0;
            -webkit-box-sizing: border-box;
            box-sizing: border-box;
            text-overflow: ellipsis;
            vertical-align: middle;
            position: relative;
            text-align: left;
        }
    </style>
</head>
<body class="hold-transition">
<div id="app">
    <div class="content-header"></div>

    <div class="app-container">
        <div class="app-container">

        </div>
        <div class="box">
            <el-row>
                <el-col :span="4" v-for="(o, index) in pocList" :key="o" >
                    <el-card :body-style="{ padding: '0px' }">
                        <img :src="o" class="image">
                        <div style="padding: 14px;">
                            <span>好吃的汉堡好吃的汉堡好吃的汉堡好吃的汉堡好吃的汉堡好吃的汉堡好吃的汉堡好吃的汉堡</span>
                            <div class="bottom clearfix">
                                <time class="time">{{ currentDate }}</time>
                                <el-button type="text" class="button">操作按钮</el-button>
                            </div>
                        </div>
                    </el-card>
                </el-col>
            </el-row>

            <!--分页-->
            <div class="pagination-container">
                <el-pagination
                        class="pagiantion"
                        @current-change="handleCurrentChange"
                        :current-page="pagination.currentPage"
                        :page-size="pagination.pageSize"
                        layout="total, prev, pager, next, jumper"
                        :total="pagination.total">
                </el-pagination>
            </div>
        </div>
    </div>
</div>
</body>

<script>
    var url = location.search;
    let param1 = getParam(url);
    var base = getBackUrl();
    var vue = new Vue({
        el: '#app',
        data: {
            currentDate: new Date(),
            activeName: 'first',//添加/编辑窗口Tab标签名称
            pagination: {//分页相关属性
                currentPage: 1,
                pageSize: 10,
                total: 100,
                queryString: '',
            },
            dataList: [],//列表数据
            pocList: [],//图片数据
            formData: {},
            options: [],
            //表单数据
            tableData: [],//新增和编辑表单中对应的健康管理师数据
            dialogFormVisible: false,//控制添加窗口显示/隐藏
            dialogFormVisibleEdit: false,
        },
        created() {
            // check();
             this.getTopicDeatilById();
        },
        methods: {
            //根据id查询topic详情
            getTopicDeatilById() {
                //console.log(param1.id);
                axios.get(base+"/topic/getTopicDeatilById/"+param1.id).then((res)=>{
                    this.pocList = res.data[0].pocUrl;
                    console.log(res.data);
                    //console.log(this.pocList)
                    //console.log(res)
                })
            },


            //分页查询
            findPage(page) {
                if (page == 1) {//判断是否是从查询按钮那点击进来的,是就重置当前页
                    this.pagination.currentPage = 1;
                }
                var param = {
                    currentPage: this.pagination.currentPage,
                    pageSize: this.pagination.pageSize,
                    queryString: this.pagination.queryString
                };
                axios.post(base + "/user/findPage", param).then((res) => {//发送ajax请求查询会员数据
                    this.dataList = res.data.records;//当前页数据赋值
                    this.pagination.total = res.data.total;//将查询出来的总条数赋值
                });


            },
            // 重置表单
            resetForm() {//重置数据
                this.formData = {};
                this.dynamicInformation = {};
                this.medicalHistory = {};
                this.activeName = 'first';
            },

            //切换页码
            handleCurrentChange(currentPage) {
                this.pagination.currentPage = currentPage;//先将当前页的页数更新,再调用查询检查组方法
                this.findPage();
            },
            findRoleName() {
                axios.post(base + "/user/findRole").then((res) => {
                    this.options = res.data.data;
                });
            },
        }
    })
</script>
</html>
<style>
    .text {
        font-size: 14px;
    }

    .item {
        margin-bottom: 18px;
    }

    .clearfix:before,
    .clearfix:after {
        display: table;
        content: "";
    }

    .clearfix:after {
        clear: both
    }

    .box-card {
        width: 480px;
    }

    .time {
        font-size: 13px;
        color: #999;
    }

    .bottom {
        margin-top: 13px;
        line-height: 12px;
    }

    .button {
        padding: 0;
        float: right;
    }

    .image {
        width: 100%; /*图片宽度*/
        display: block;

    }

    .clearfix:before,
    .clearfix:after {
        display: table;
        content: "";
    }

    .clearfix:after {
        clear: both
    }
</style>